package com.lrkj.back.service.impl;

import java.util.List;
import java.util.Map;

import com.lrkj.back.mapper.ZsPackageImformationMapper;
import com.lrkj.back.entity.ZsPackageImformation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.lrkj.back.service.ZsZhuisuService;
import cn.com.cbons.mamisay.parent.db.api.DBInterface;
import cn.com.cbons.mamisay.parent.exception.DBException;
import cn.com.cbons.mamisay.parent.service.base.ParentServiceImpl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;

@Transactional
@Service("zhuisu")
public class ZsZhuisuServiceImpl extends ParentServiceImpl<ZsPackageImformation> implements ZsZhuisuService {

    @Autowired
    private ZsPackageImformationMapper zhuisudao;

    @Override
    protected DBInterface<ZsPackageImformation> getDao() throws DBException {
        return zhuisudao;
    }

    @Override
    public PageInfo<ZsPackageImformation> findAllHuiShou(Map<String, Object> map) throws DBException {
        // TODO Auto-generated method stub
        PageHelper.startPage(Integer.valueOf(map.get("pageNo").toString()),
                Integer.valueOf(map.get("pageSize").toString()));
        List<ZsPackageImformation> tbList = zhuisudao.findAllZhuisu(map);
        PageInfo<ZsPackageImformation> page = new PageInfo<ZsPackageImformation>(tbList);
        return page;
    }
}
